module joyUI {
	/**
	 * 
	 * 有滚动条功能的格子list
	*/
	export class TileList extends egret.Sprite {
		protected _scroller:eui.Scroller;
		protected _list:JTileList;
		protected _dataPro:eui.ArrayCollection;
		public constructor() {
			super();
			this._list = new joyUI.JTileList();
			this._scroller = new eui.Scroller();
			this.scrollPolicyV = eui.ScrollPolicy.ON;
			this.scrollPolicyH = eui.ScrollPolicy.OFF;
			this.addChild(this._scroller);
			this._scroller.viewport = this._list;
			this._dataPro = new eui.ArrayCollection();
		}

		public setSize(w:number,h:number):void{
			this._scroller.width = w;
			this._scroller.height = h;
		}
		public set scrollPolicyV(value:string){
			this._scroller.scrollPolicyV = value;
		}
		public set scrollPolicyH(value:string){
			this._scroller.scrollPolicyH = value;
		}

		public set dataProvider(data:Array<any>){
			this._dataPro.source = data;
			this._list.dataProvider = this._dataPro;
			
		}


	}
}